package com.taijihuabao.common.exception;


import com.taijihuabao.common.jsonresult.ApplicationResponseCode;

/**
 * 自定义service层异常类
 *
 * @author Luo
 */
public class ServiceException extends RuntimeException {

    private static final long serialVersionUID = 2123652018589467617L;

    private ApplicationResponseCode resultCode;

    public ServiceException(ApplicationResponseCode resultCode) {
        this(resultCode.getValue());
        this.resultCode = resultCode;
    }

    private ServiceException(String message) {
        super(message);
    }

    public ApplicationResponseCode getResultCode() {
        return resultCode;
    }

}
